#include<bits/stdc++.h>
#define int long long
using namespace std;
int a[100001],h[100001];
main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	int n,l=1,r=2;
	cin>>n;
	int ans=n;
	for(int i=1;i<=n;i++) cin>>a[i];
	sort(a+1,a+1+n);
	while(l<r){
		while(a[l]==a[r]){
			r++;
			if(h[r]) r++;
		}
		if(r>n) break;
		h[l]=h[r]=1;
		ans--;
		l++;
		r++;
	}
	cout<<ans;
	return 0;
}
